<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>





<c:if test="${person.userName != \"\"}">
    You are logging in as <br>
    <label>${person.forName}&nbsp${person.lastName}</label>
</c:if>
<c:if test="${person.userName == \"\"}">

    <form:form action="/" commandName="person">
        <table>
            <tr>
                <td>
                    User name: <form:input path="userName" cssClass="usernameField" />
                </td>
            </tr>
            <tr>
                <td>
                    Password: <form:password path="password" cssClass="passwordField"/>
                </td>
            </tr>
            <tr>
                <td>                    
                    <input type="submit" value="Login"/>
                </td>
            </tr>
        </table>
    </form:form>
</c:if>
